<template>
  <div>
    {{ msg }}

    <a-button type="primary" @click="goBack">
      Go back
    </a-button>

    <div><h1 style="color: red">vuex ({{ $store.state.count }})</h1></div>
  </div>
</template>

<script>
export default {
  name: "Home",
  data() {
    return {
      msg: '自定义路由'
    }
  },
  created() {
    // const id = this.$route.query.id;
    // const id =this.$route.params.id
    //  alert(id)
  },
  methods: {
    goBack() {
      this.$router.back();
    }
  }
}
</script>

<style scoped>

</style>
